SetControlVisibility
NEW WITH THE APPEARANCE MANAGER
Sets the visibility of a control, and any embedded controls, and specifies whether it will be drawn.
pascal OSErr SetControlVisibility ( ControlHandle inControl, Boolean inIsVisible, Boolean inDoDraw);
inControl
- On input, a handle to the control.
inIsVisible
- A Boolean value indicating whether the control is visible or invisible. If this value is set to
true
, the control will be visible. Iffalse
, the control will be invisible. If you wish to show a control (and latent embedded subcontrols) but do not want to cause screen drawing, passtrue
for this parameter and false in theinDoDraw
parameter.inDoDraw
- On input, Boolean value indicating whether the control should be drawn or erased. If
true
, the control's display on the screen should be updated (drawn or erased) based on the value passed in theinIsVisible
parameter. Iffalse
, the display will not be updated.- function result
- A result code; see "Result Codes".
DISCUSSION
You should call theSetControlVisibility
function instead of setting thecontrlVis
field of the control structure to set the visibility of a control and specify whether it will be drawn. If the control has embedded controls,SetControlVisibility
allows you to set their visibility and specify whether or not they will be drawn. If you wish to show a control but do not want it to be drawn onscreen, passtrue
in theinIsVisible
parameter and false in theinDoDraw
parameter.SEE ALSO
"Appearance Manager Gestalt Selector Constants".